#!/bin/bash

PWD=`pwd`
echo $PWD
rm -rf server.tar.gz

echo release package

tar zcvf server.tar.gz --exclude='*.db' --exclude='protected/apples-group.json' --exclude='assets/' server

echo package success , start upload!

scp server.tar.gz root@115.28.3.15:/alidata/www/yaoba/
ssh root@115.28.3.15 '/alidata/www/yaoba/deploy.sh'
echo main server success!!

scp server.tar.gz root@xayoudao.com:/alidata/www/yaoba/
ssh root@xayoudao.com '/alidata/www/yaoba/deploy.sh'
echo second server success !!

echo success!
say success! &
